const csv = `
name,age,parent
Bob,30,David
David,60,
Anna,10,Bob
`;

const processor = (data, delimiter=',') => {
    data = data.trim();
    // let csvStr = data.slice(data.indexOf('\n'));
    // console.log(data)
    const titlesData = data.slice(0, data.indexOf('\n'));
    // console.log(titlesData)
    const titles = titlesData.split(delimiter)
    // console.log(titles)

    const rows = data
        .slice(data.indexOf('\n') + 1)
        .slice('\n')
        // console.log(rows)

        
}
processor(csv)